package com.eliaukjq.xunlianying;

import java.util.*;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2024/7/10 - 17:45
 */
public class mapdemo {
    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<>();
        map.put("one", 1);
        map.put("two", 2);
        map.put("three", 3);

        Set<String> keySet = map.keySet();
        System.out.println("Keys: " + keySet);

        Collection<Integer> values = map.values();
        List<Integer> valueList = new ArrayList<>(values);
        System.out.println("Values: " + valueList);

        Set<Map.Entry<String, Integer>> entrySet = map.entrySet();
        System.out.println("Entries: " + entrySet);
    }
}
